<template>
  <!-- 分页组件 -->
  <div class="box">
    <el-pagination
      background
      @size-change="size"
      @current-change="current"
      :page-sizes="[5, 10, 20, 50]"
      layout=" prev, pager, next,sizes, jumper"
      :total="counts"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    counts: {
      type: Number,
    },
    pagesize: {
      type: Number,
      required: true,
    },
  },
  data() {
    return {};
  },
  methods: {
    size(m) {
      this.$emit("SizeChange", m);
    },
    current(n) {
      this.$emit("CurrentChange", n);
    },
  },
};
</script>

<style scoped lang="scss">
.box {
  margin-top: 20px;
  text-align: right;
}
</style>
